from pymilvus import (
    Milvus,
    connections,
    utility,
    FieldSchema,
    CollectionSchema,
    DataType,
    Collection
)

milvus = Milvus(host='c-7d932e12dfccbfff.milvus.aliyuncs.com', port='19530')

fields = [
    FieldSchema(name="pk", dtype=DataType.INT64, is_primary=True, auto_id=False),
    FieldSchema(name="random", dtype=DataType.DOUBLE),
    FieldSchema(name="embeddings", dtype=DataType.FLOAT_VECTOR, dim=8)
]

collection_name = 'test01'
#     'dimension': 512,
#     'index_file_size': 1024,
#     'fields': fields
# }
schema = CollectionSchema(fields, "hello_milvus is the simplest demo to introduce the APIs")
hello_milvus = Collection(collection_name, schema)
print(hello_milvus)
